//
//  SVProgressHUD+Extension.m
//  New_Runway
//
//  Created by NewLife on 2018/3/12.
//  Copyright © 2018年 NelsonJ. All rights reserved.
//

#import "SVProgressHUD+Extension.h"

@implementation SVProgressHUD (Extension)

+ (void)showSuccessWithStatus:(NSString *)status dismissDelay:(NSTimeInterval)delay {
    
    [SVProgressHUD showSuccessWithStatus:status];
    [SVProgressHUD dismissWithDelay:delay];
}

+ (void)showSuccessWithStatus:(NSString *)status dismissDelay:(NSTimeInterval)delay didDismiss:(void (^)(void))dismiss {
    
    [SVProgressHUD showSuccessWithStatus:status];
    [SVProgressHUD dismissWithDelay:delay completion:^{
        if (dismiss) {
            dismiss();
        }
    }];
}

+ (void)showErrorWithStatus:(NSString *)status dismissDelay:(NSTimeInterval)delay {
    
    [SVProgressHUD showErrorWithStatus:status];
    [SVProgressHUD dismissWithDelay:delay];
}

+ (void)showErrorWithStatus:(NSString *)status dismissDelay:(NSTimeInterval)delay didDismiss:(void (^)(void))dismiss {
    
    [SVProgressHUD showErrorWithStatus:status];
    [SVProgressHUD dismissWithDelay:delay completion:^{
        if (dismiss) {
            dismiss();
        }
    }];
}

+ (void)showWithStatus:(NSString *)status dismissDelay:(NSTimeInterval)delay {
    
    [SVProgressHUD showWithStatus:status];
    [SVProgressHUD dismissWithDelay:delay];
}

+ (void)showWithStatus:(NSString *)status dismissDelay:(NSTimeInterval)delay didDismiss:(void (^)(void))dismiss {
    
    [SVProgressHUD showWithStatus:status];
    [SVProgressHUD dismissWithDelay:delay completion:^{
        if (dismiss) {
            dismiss();
        }
    }];
}

@end
